// SimNet is a Second Life(tm) sim mangement tool that was designed for Fermi Sandbox
// Copyright (C) 2011 Arthur Fermi
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To receive a copy of this license please visit http://www.gnu.org/licenses/

// SimNet - Event History

// Global Variables

// Read in messages
string  gstrURL;

default
{
    state_entry()
    {
        // Get URL for web site
        llMessageLinked(LINK_SET, 333, "Getting URL", NULL_KEY);
    }

    touch_start(integer total_number)
    {
        llLoadURL(llDetectedKey(0), "This will show you the last 10 events you created, and the last 100 events by everyone.",gstrURL + "simnet_eventhistory.php?Request=" + llEscapeURL(llKey2Name(llDetectedKey(0))));
    }
    
    link_message(integer sender_num, integer num, string str, key id)
    {
        if ( num == 334)
        {
            gstrURL = str;
        }
    }
    
    on_rez(integer start_param)
    {
        llResetScript();
    }
}